﻿// funtion like product
function likeproduct(ProductId) {
    $.ajax({
        type: "GET",
        url: "ajax/LikeProduct.ashx?ProductID='" + ProductId + "'",
        success: function (responseText) {
            if (responseText == 1) {
                alert("Like success");
            }
            else if (responseText == -1) {
                alert("Like fail");
            }
        }
    });
}
// Function add product to favourite
function FavouriteProduct(ProductId) {
    $.ajax({
        type: "GET",
        url: "ajax/Favourite.ashx?ProductID='" + ProductId + "'",
        success: function (responseText) {
            if (responseText == 1) {
                alert("Add success");
            }
            else if (responseText == -1) {
                alert("Add fail");
            }
        }
    });
}
